Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce Kill Pin Wait #26945

Merged

Conversation

InsanityAutomation
Copy link
Contributor

While working with @p3p on an issue in the simulator where we were triggering the kill pin, we noticed a very pronounced delay. In the case of the simulator linux HAL, the idle loop rate was 500hz and therefore this added significant dwell to the execution of the stop function. Looking at the code, we see the delay is called in cycles, not ms. This function cannot use the safe_delay calls as it is inside the manage inactivity function. The consensus in discussion on discord is that as a safety function, we should only be debouncing for signal noise, not accidental press. Most common actuation of a safety button is a rapid slap, not a press and hold.

Therefore we have 2 options. 1. Reduce the time to whats reasonable as a debounce or 2. Count ticks. For the moment, I opted for the simpler reduction and allowed an override for especially noisy systems. I updated the comment in order to point out explicitly that this should function as a debounce.

@sjasonsmith sjasonsmith merged commit 6575dcc into MarlinFirmware:bugfix-2.1.x Apr 13, 2024
61 checks passed
RPGFabi pushed a commit to RPGFabi/Marlin that referenced this pull request Jun 15, 2024
Reduce kill pin wait time, and allow override by setting KILL_DELAY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants